from selenium import webdriver
from selenium.webdriver.common.by import By
driver = webdriver.Chrome()
driver.get("https://www.baidu.com/")
driver.maximize_window()
driver.implicitly_wait(15)

# 获取页面的url
current_url = driver.current_url
assert current_url == "https://www.baidu.com/"


# 获取页面的title信息
title = driver.title
assert title == "百度一下，你就知道"

# 获取页面的文本信息
text = driver.find_element(By.LINK_TEXT,"贴吧").text
assert text == "贴吧"

